<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改字典类型')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-dict-type-edit" th:object="${dictType}">
        <input id="id" name="id" type="hidden" th:field="*{id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">字典名称：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="typeName" id="typeName" th:field="*{typeName}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">字典类型：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="typeSign" id="typeSign" th:field="*{typeSign}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">显示顺序：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="orderNum" id="orderNum" th:field="*{orderNum}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">使用状态：</label>
            <div class="col-sm-8">
                <div class="radio-box"
                     th:each="dict : ${@sysDictDataServiceImpl.listDictDataByTypeSign('sys_use_status')}">
                    <input type="radio" th:id="${dict.id}" name="use" th:value="${dict.dataValue}" th:field="*{use}">
                    <label th:for="${dict.id}" th:text="${dict.dataKey}"></label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea id="remark" name="remark" class="form-control">[[*{remark}]]</textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "system/dict/type";

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-dict-type-edit').serialize());
        }
    }
</script>
</body>
</html>
